<div [@routerTransition]>
    <div class="m-subheader">
        <div class="d-flex align-items-center">
            <div class="mr-auto col-xs-6">
                <h3 class="m-subheader__title ">
                    <span>存货记录</span>
                </h3>
                <span>
                        <span style="margin-left:10px;">选择时间：</span>
                <div style="width:520px;display:inline-block;">
                    <p-calendar [(ngModel)]="selectedDate" view="month" name="cal" dateFormat="yy-mm" [yearNavigator]="true" yearRange="2000:2030" [locale]="calendarHelper.cn"></p-calendar>
                    <button class="btn btn-primary" type="button" (click)="getReport()" style="margin-left: 20px;">
                                    查询
                                </button>
                                <button class="btn btn-primary" type="button" (click)="createOrEditChReportModal.show(1)" style="margin-left: 20px;">
                                    录入初始数据
                                </button>
                    <button class="btn btn-primary" type="button" (click)="createOrEditChReportModal.show(2)" style="margin-left: 20px;">
                                录入
                            </button>
                </div>

                </span>



            </div>



        </div>
    </div>
    <div class="m-content">
        <div class="m-portlet m-portlet--mobile">
            <div class="m-portlet__body">
                <div class="row" style="color: #097e98; font-weight: 700; font-size: 17px;">
                    <div class="col-6">天津存货报表</div>

                </div>
                <table class="report table">
                    <thead>
                        <tr>
                            <th>型号</th>
                            <th>主材成本</th>
                            <th>
                                辅材成本</th>
                            <th>标准件</th>
                            <th>外协加工费</th>
                            <th>工装成本</th>
                            <th>人工成本</th>
                            <th>燃料动力</th>
                            <th>制造费用</th>
                            <th>其他直接成本</th>
                        </tr>
                    </thead>
                    <tbody>

                        <ng-container *ngFor="let record of tabledata">
                            <tr>
                                <th scope="row">
                                    {{ record.modelCode}}
                                </th>
                                <td>
                                    {{ record.zhuCaiCost}}
                                </td>
                                <td>
                                    {{ record.fuCaiCost}}
                                </td>
                                <td>
                                    {{ record.biaoZhunJianCost}}
                                </td>
                                <td>
                                    {{ record.waiXieCost}}
                                </td>
                                <td>
                                    {{ record.gongZhuangCost}}
                                </td>
                                <td>
                                    {{ record.renGongCost}}
                                </td>
                                <td>
                                    {{ record.ranDongCost}}
                                </td>
                                <td>
                                    {{ record.zhiZaoCost}}
                                </td>
                                <td>
                                    {{ record.qiTaCost}}
                                </td>
                            </tr>
                        </ng-container>
                    </tbody>
                </table>
            </div>
        </div>


    </div>

    <createOrEditChReportModal #createOrEditChReportModal (modalSave)="getReport()"></createOrEditChReportModal>

</div>